<template>
  <div>
    <!-- 未勾选 -->
    <el-card class="box-card" :hidden="importDataType == '软磁性能' || importDataType == '永磁性能' || importDataType == '导电性能'"> 请勾选上表数据 </el-card>
    <!-- 软磁 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '软磁性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>

      <!-- 静态原始波形 -->
      <el-table ref="measureTable" v-if="tableVisiable[0]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" id="cuttingAngle" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" id="frequency" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" id="temperature" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="100px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="交流磁密/T" width="100px" prop="acMagneticDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="140px" prop="dcMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="140px" prop="acMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="有无护套" width="100px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="消除应力退火" width="120px" prop="stressReliefAnnealing" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="损耗/(J/kg)" width="120px" align="center" prop="wastage" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="最大磁密/T" width="120px" prop="maximumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="最小磁密/T" width="120px" prop="minimumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[17] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[18] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[19] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[20] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 静态磁化曲线 -->
      <el-table ref="measureTable" v-if="tableVisiable[1]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="最大磁密/T" width="100px" prop="maximumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="最小磁密/T" width="100px" prop="minimumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="有无护套" width="100px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="消除应力退火" width="120px" align="center" prop="stressReliefAnnealing" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 静态磁滞回线线 -->
      <el-table ref="measureTable" v-if="tableVisiable[2]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="100px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="交流磁密/T" width="100px" prop="acMagneticDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="140px" prop="dcMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="140px" prop="acMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="有无护套" width="140px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="消除应力退火" width="120px" prop="stressReliefAnnealing" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="损耗/(J/kg)" width="120px" align="center" prop="wastage" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="最大磁密/T" width="120px" prop="maximumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="最小磁密/T" width="120px" prop="minimumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[17] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[18] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[19] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[20] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 静态铁损曲线 -->
      <el-table ref="measureTable" v-if="tableVisiable[3]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" align="center" label="温度/Cel.Deg." width="120px" prop="temperature" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="最大铁损/(J/kg)" width="140px" prop="maximumIronLoss" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="最大磁密/T" width="100px" prop="maximumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="最小铁损/(J/kg)" width="140px" prop="minimumIronLoss" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="最小磁密/T" width="100px" prop="minimumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="有无护套" width="100px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="消除应力退火" width="120px" align="center" prop="stressReliefAnnealing" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 动态原始波形 -->
      <el-table ref="measureTable" v-if="tableVisiable[4]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0]" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="100px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="交流磁密/T" width="100px" prop="acMagneticDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="140px" prop="dcMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="140px" prop="acMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="有无护套" width="140px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="消除应力退火" width="120px" prop="stressReliefAnnealing" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="损耗/(W/kg)" width="120px" align="center" prop="wastage" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" label="视在功率(VA/kg)" width="130px" prop="apparentPower" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" label="电势波形因子" width="120px" align="center" prop="potentialFactor" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="最大磁密/T" width="110px" prop="maximumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" align="center" label="最小磁密/T" width="120px" prop="minimumFluxDensity" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[17] == 1" align="center" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[18] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[19] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[20] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[21] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[22] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 动态磁化曲线 -->
      <el-table ref="measureTable" v-if="tableVisiable[5]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="120px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="最大磁密/T" width="120px" prop="maximumFluxDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="最小磁密/T" width="120px" prop="minimumFluxDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="有无护套" width="140px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="消除应力退火" width="120px" prop="stressReliefAnnealing" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 动态磁滞回线 -->
      <el-table ref="measureTable" v-if="tableVisiable[6]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" label="频率/Hz" align="center" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="100px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="交流磁密/T" width="100px" prop="acMagneticDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="直流磁场/(A/m)" width="140px" prop="dcMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="交流磁场/(A/m)" width="140px" prop="acMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="最大磁密/T" width="100px" prop="maximumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="最大磁场/(A/m)" width="140px" prop="maximumMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="最小磁密/T" width="100px" prop="minimumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="最小磁场/(A/m)" width="140px" prop="minimumMagneticField" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="有无护套" width="100px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" label="消除应力退火" width="120px" align="center" prop="stressReliefAnnealing" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" label="损耗/(W/kg)" width="120px" align="center" prop="wastage" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" label="视在功率(VA/kg)" width="130px" prop="apparentPower" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[17] == 1" label="电势波形因子" width="120px" align="center" prop="potentialFactor" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[18] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[19] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[20] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[21] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[22] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>

      <!-- 动态铁损曲线 -->
      <el-table ref="measureTable" v-if="tableVisiable[7]" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[0] == 1" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[1] == 1" align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[2] == 1" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[3] == 1" label="直流磁密/T" width="100px" prop="dcMagneticDensity" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[4] == 1" label="最大铁损/(W/kg)" width="140px" prop="maximumIronLoss" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[5] == 1" label="最大磁密/T" width="100px" prop="maximumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[6] == 1" label="最小铁损/(W/kg)" width="140px" prop="minimumIronLoss" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[7] == 1" label="最小磁密/T" width="100px" prop="minimumFluxDensity" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[8] == 1" label="有无护套" width="100px" prop="sheath" align="center" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[9] == 1" label="叠压方向应力/MPa" width="160px" prop="overlyingStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[10] == 1" label="平行应力/MPa" width="120px" prop="parallelStress" show-overflow-tooltip align="center"></el-table-column>
        <el-table-column v-if="conditionList.visableList[11] == 1" label="消除应力退火" width="120px" align="center" prop="stressReliefAnnealing" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[12] == 1" align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column v-if="conditionList.visableList[13] == 1" align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[14] == 1" align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[15] == 1" align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column v-if="conditionList.visableList[16] == 1" align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>
      <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pagenum" :page-sizes="[10, 20]" :page-size="pageVo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination>
    </el-card>
    <!-- 永磁 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '永磁性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-table ref="measureTable" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="温度/Cel.Deg" prop="temperature" width="140px" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="Br/T" width="80px" prop="brT" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="Hcb/(kA/m)" width="120px" prop="hcb" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="Hcj/(kA/m)" width="120px" prop="hcj" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="BHm/(kJ/m^3)" width="140px" prop="bhm" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="Hmax/(kA/m)" width="120px" prop="hmax" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="测量日期" prop="testDate" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>
      <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pagenum" :page-sizes="[10, 20]" :page-size="pageVo.pagesize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination>
    </el-card>
    <!-- 导电 -->
    <el-card class="box-card" style="margin-top: 10px" v-if="importDataType == '导电性能'">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">测量条件</span>
      </div>
      <el-table ref="measureTable" :data="conditionList.datalist" border style="margin-top: 10px" @selection-change="addChart">
        <el-table-column type="selection" width="55"> </el-table-column>
        <el-table-column align="center" label="样品编号" prop="num" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="牌号" prop="grade" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="裁剪角度/Deg." width="120px" prop="cuttingAngle" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="测量间距/m" width="120px" prop="measuringDistance" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="频率/Hz" prop="frequency" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="温度/Cel.Deg" width="120px" prop="temperature" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="消除应力退火" width="120px" prop="stressReliefAnnealing" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="测量标准" prop="standard" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column align="center" label="测试员" prop="testControler" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="备注" prop="remarks" show-overflow-tooltip></el-table-column>
        <el-table-column align="center" label="文件名" prop="fileName" show-overflow-tooltip></el-table-column>
      </el-table>
      <el-pagination @size-change="handleSizeChange1" @current-change="handleCurrentChange1" :current-page="pageVo.pageNum" :page-sizes="[10, 20]" :page-size="pageVo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total1"> </el-pagination>
    </el-card>

    <!-- 图表展示卡片区 -->
    <el-card class="box-card" style="margin-top: 10px">
      <div slot="header">
        <span style="color:#4e9efd;font-size:17px;">图表展示</span>
      </div>
      <el-row :gutter="20">
        <el-col :span="4" v-if="curve == '磁化曲线' || curve == '铁损曲线'">
          <el-button :type="indexEnlargeType" @click="indexEnlarge" size="mini">{{ indexEnlargeName(indexEnlargeStatus) }}</el-button>
        </el-col>
      </el-row>
      <div id="main" :style="`height:${graphHeight}px;width:${graphWidth}px`"></div>
    </el-card>
  </div>
</template>

<script>
import * as echarts from 'echarts'
import { Message } from 'element-ui'
export default {
  props: {
    conditionNum: {},
    importDataType: '', //判断是软磁、永磁、导电
    tableRow: {} //主库选中的那一行数据
  },
  data() {
    return {
      externalDataSource: '',
      /********************echarts ************************/
      indexEnlargeStatus: true,
      indexEnlargeType: '',
      ruanCiTableRow: {},
      exportMeasureDataId: '',
      xAxisName: '',
      yAxisName: '',
      yAxisAnotherName: '',
      graphWidth: 1350,
      // graphWidth: 1280,
      graphHeight: 600,
      GraphOption: {
        toolbox: {
          show: true,
          feature: {
            dataView: {
              readOnly: false
            },
            // restore: {},
            saveAsImage: {},
            // mark: { show: true },
            // dataView: { show: true, readOnly: false },
            // saveAsImage: { show: true }
          }
        },
        dataZoom: [
          {
            disabled: false,
            id: 'dataZoomX',
            type: 'inside',
            top: 'bottom',
            xAxisIndex: [0],
            filterMode: 'empty'
          },
          {
            disabled: false,
            id: 'dataZoomY',
            type: 'inside',
            yAxisIndex: [0],
            filterMode: 'empty'
          }
        ],
        grid: [{ top: 40 }], //大概每个legend增加20
        legend: {
          icon: 'none',
          textStyle: {
            color: 'inherit'
          },
          // left: '15%',
          // right: '15%',
          data: [],
          formatter: function(name) {
            return echarts.format.truncateText(name, 1000, '14px Microsoft Yahei', '…')
          },
          tooltip: {
            confine: true,
            show: true,
            formatter: (params, ticket, callback) => {
              let paramsSplit = params.name.split(',')
              let paramsBack = paramsSplit
                .map(x => {
                  return x + `<br />`
                })
                .join('') //这里使用join('')是为了祛除map遍历添加的逗号
              return paramsBack
            }
          }
        },
        tooltip: {
          confine: true,
          formatter: (params, ticket, callback) => {
            if (params.componentIndex % 2 == 0) {
              //偶数-■-
              return this.xAxisName + ':' + params.data[0] + `<br />` + this.yAxisName + ':' + params.data[1]
            } else {
              //奇数-○-
              return this.xAxisName + ':' + params.data[0] + `<br />` + this.yAxisAnotherName + ':' + params.data[1]
            }
          }
        },
        xAxis: {
          name: '',
          nameTextStyle: {
            color: 'skyblue',
            padding: [5, 0, 0, 0]
          },
          nameLocation: 'middle',
          axisLine: {
            onZero: false
          }
        },
        yAxis: [
          {
            name: '',
            position: 'left',
            nameTextStyle: {
              color: 'green'
            },
            axisLine: {
              onZero: false
            }
          },
          {
            name: '',
            show: false,
            position: 'right',
            nameTextStyle: {
              color: 'green'
            },
            axisLine: {
              onZero: false
            }
          }
        ],
        series: []
      },
      measureHead: [], //动态生成表头
      /********************echarts ************************/

      /******************** 收藏 ************************/
      collectVisible: false,
      collectinformation: {},
      collectinSupplement: '',
      /******************** 收藏 ************************/
      exportMeaCondFlag: true,
      arr: [],
      curve: '',
      display: '',
      conditionInfo: {
        curveTypes: '',
        timeTypes: '',
        productId: ''
      },
      total: 10,
      total1: 10,
      //测量条件分页
      pageVo: {
        //当前的页数
        pageNum: 1,
        //当前每页显示多少条数据
        pageSize: 10
      },
      tableVisiable: [0, 0, 0, 0, 0, 0, 0, 0],
      sampleSize: '',
      conditionList: {
        datalist: [],
        visableList: []
      },
      //静态原始波形
      staticOriginalWave: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态磁化曲线
      staticMagnetizingCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态磁滞回线
      staticHysteresisLoop: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //静态铁损曲线
      staticIronLossCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态原始波形
      dynamicOriginalWave: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态磁化曲线
      dynamicMagnetizingCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态磁滞回线
      dynamicHysteresisLoop: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      //动态铁损曲线
      dynamicIronLossCurve: [
        {
          //实心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //叠心圆环
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //爱泼斯坦方圈
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //一维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //微小异形
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //卷绕铁心
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //二维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //三维单片
          datalist: [],
          visableList: [1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1]
        },
        {
          //未知
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //定子冲片
          datalist: [],
          visableList: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1]
        },
        {
          //闭路铁心
          datalist: [],
          visableList: []
        },
        {
          //开路铁心
          datalist: [],
          visableList: []
        }
      ],
      // 软磁曲线类型
      ruanCiCurveOptions: [
        {
          label: '原始波形',
          value: '原始波形'
        },
        {
          label: '磁化曲线',
          value: '磁化曲线'
        },
        {
          label: '磁滞回线',
          value: '磁滞回线'
        },
        {
          label: '铁损曲线',
          value: '铁损曲线'
        }
      ],
      // 软磁时间形式
      ruanCiDisplayOptions: [
        {
          label: '动态',
          value: '动态'
        },
        {
          label: '静态',
          value: '静态'
        }
      ],
      // 永磁曲线类型
      yongCiCurveOptions: [
        {
          label: '原始波形',
          value: '原始波形'
        },
        {
          label: '磁滞回线',
          value: '磁滞回线'
        },
        {
          label: '退磁曲线',
          value: '退磁曲线'
        }
      ],
      // 永磁时间形式
      yongCiDisplayOptions: [
        {
          label: '静态',
          value: '静态'
        }
      ],
      // 导电曲线类型
      daoDianCurveOptions: [
        {
          label: '伏安曲线',
          value: '伏安曲线'
        },
        {
          label: '电阻曲线',
          value: '电阻曲线'
        },
        {
          label: '电阻率曲线',
          value: '电阻率曲线'
        },
        {
          label: '电导率曲线',
          value: '电导率曲线'
        }
      ],
      // 导电时间形式
      daoDianDisplayOptions: [
        {
          label: '静态',
          value: '静态'
        }
      ]
    }
  },
  computed: {
    indexEnlargeName() {
      return function(status) {
        if (status == true) {
          this.indexEnlargeType = 'primary'
          // &emsp;等于\u2003   代表一个中文文字大小的空格
          return '半对数图'
        } else {
          this.indexEnlargeType = 'dashed'
          return '关闭半对数图'
        }
      }
    }
  },
  methods: {
    judge1() {
      //曲线类型选择判断
      this.conditionInfo.curveTypes = this.curve
      this.showGraph()
    },
    judge2() {
      console.log('2')
      //时间形式选择判断
      this.conditionInfo.timeTypes = this.display
      this.showGraph()
    },
    showGraph() {
      if (this.importDataType == '软磁性能') {
        if (this.conditionInfo.curveTypes == '' || this.conditionInfo.timeTypes == '' || this.sampleSize == '') {
          return false
        } else if (this.conditionInfo.curveTypes == '原始波形' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[0] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticOriginalWave[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticOriginalWave[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticOriginalWave[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticOriginalWave[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticOriginalWave[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticOriginalWave[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticOriginalWave[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticOriginalWave[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticOriginalWave[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁化曲线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[1] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticMagnetizingCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticMagnetizingCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticMagnetizingCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticMagnetizingCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticMagnetizingCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticMagnetizingCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticMagnetizingCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticMagnetizingCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticMagnetizingCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁滞回线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[2] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticHysteresisLoop[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticHysteresisLoop[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticHysteresisLoop[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticHysteresisLoop[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticHysteresisLoop[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticHysteresisLoop[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticHysteresisLoop[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticHysteresisLoop[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticHysteresisLoop[8]
          }
        } else if (this.conditionInfo.curveTypes == '铁损曲线' && this.conditionInfo.timeTypes == '静态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[3] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.staticIronLossCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.staticIronLossCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.staticIronLossCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.staticIronLossCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.staticIronLossCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.staticIronLossCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.staticIronLossCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.staticIronLossCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.staticIronLossCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '原始波形' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[4] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicOriginalWave[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicOriginalWave[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicOriginalWave[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicOriginalWave[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicOriginalWave[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicOriginalWave[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicOriginalWave[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicOriginalWave[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicOriginalWave[8]
          } else if (this.sampleSize == 'test') {
            this.conditionList = this.dynamicOriginalWave[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁化曲线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[5] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicMagnetizingCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicMagnetizingCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicMagnetizingCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicMagnetizingCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicMagnetizingCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicMagnetizingCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicMagnetizingCurve[8]
          }
        } else if (this.conditionInfo.curveTypes == '磁滞回线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[6] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicHysteresisLoop[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicHysteresisLoop[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicHysteresisLoop[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicHysteresisLoop[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicHysteresisLoop[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicHysteresisLoop[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicHysteresisLoop[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicHysteresisLoop[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicHysteresisLoop[8]
          }
        } else if (this.conditionInfo.curveTypes == '铁损曲线' && this.conditionInfo.timeTypes == '动态') {
          this.tableVisiable = [0, 0, 0, 0, 0, 0, 0, 0]
          this.tableVisiable[7] = 1
          if (this.sampleSize == '实心圆环') {
            this.conditionList = this.dynamicIronLossCurve[0]
          } else if (this.sampleSize == '叠片圆环') {
            this.conditionList = this.dynamicIronLossCurve[1]
          } else if (this.sampleSize == '爱泼斯坦方圈') {
            this.conditionList = this.dynamicIronLossCurve[2]
          } else if (this.sampleSize == '一维单片') {
            this.conditionList = this.dynamicIronLossCurve[3]
          } else if (this.sampleSize == '微小异形') {
            this.conditionList = this.dynamicIronLossCurve[4]
          } else if (this.sampleSize == '卷绕铁心') {
            this.conditionList = this.dynamicIronLossCurve[5]
          } else if (this.sampleSize == '二维单片') {
            this.conditionList = this.dynamicIronLossCurve[6]
          } else if (this.sampleSize == '三维单片') {
            this.conditionList = this.dynamicIronLossCurve[7]
          } else if (this.sampleSize == '未知') {
            this.conditionList = this.dynamicIronLossCurve[8]
          }
        } else {
          return false
        }
        this.getCondition()
      } else if (this.importDataType == '永磁性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      } else if (this.importDataType == '导电性能') {
        if (this.conditionInfo.curveTypes !== '' && this.conditionInfo.timeTypes !== '' && this.conditionInfo.productId !== '') {
          this.getCondition()
        }
      }
    },
    /*************分页函数**************/
    handleSizeChange1(newSize) {
      this.pageVo.pageSize = newSize
      this.getCondition()
    },
    handleCurrentChange1(newPage) {
      this.pageVo.pageNum = newPage
      this.getCondition()
    },
    /*************分页函数**************/

    //获取测量条件
    getCondition() {
      this.conditionList.datalist = this.externalDataSource
    },
    // 其他地方引入该组件调用函数传值
    otherTransfer(tableData, curve, display, sampleSize, productId) {
      this.externalDataSource = tableData
      this.conditionInfo.curveTypes = curve
      this.conditionInfo.timeTypes = display
      this.sampleSize = sampleSize
      this.conditionInfo.productId = productId
      this.showGraph()
    },

    //***********************下面为echarts图表处理函数************************** */
    //获取测量数据，渲染echarts
    addChart(rows) {
      var h = -1
      this.GraphOption.series = []
      if (rows == []) return false
      var arr = rows.map(x => {
        this.exportMeasureDataId = x.id
        return x.id
      })

      //通过ref获取el-table的表头数据
      let columnTitle = this.$refs.measureTable.$children
        .filter(x => {
          return x._props.prop !== undefined
        })
        .map(x => {
          return new Object({
            prop: x._props.prop,
            label: x._props.label
          })
        })
      var nameTitle = rows.map(x => {
        let addTitle = ''
        for (let i = 0; i < columnTitle.length; i++) {
          addTitle = addTitle + columnTitle[i].label + ':' + x[`${columnTitle[i].prop}`] + ','
        }
        return addTitle
      })

      if (arr == '') {
        this.myChart.clear()
      } else if (this.importDataType == '软磁性能') {
        this.myChart = echarts.init(document.getElementById('main'))
        this.myChart.showLoading()
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: `/productMetricalData/getMaterialData/${this.sampleSize}`,
          method: 'POST',
          data: new Object({ type: '软磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes, dataId: arr })
        }).then(res => {
          console.log('冬哥的数据', res)
          this.measureHead = []
          // 处理表头数据
          for (let i = 0; i < res.data.result.comments.length; i++) {
            let addData = {
              label: '',
              name: ''
            }
            addData.label = res.data.result.comments[i].label
            addData.name = res.data.result.comments[i].name
            this.measureHead.push(addData)
          }
          // 处理表身数据
          this.measureList = []
          this.measureList = res.data.result.list[res.data.result.list.length - 1]

          //type=1为普通echarts图表，type=2为以频率为横坐标的图表，type=3为以数据个数为横坐标的图表
          if (res.data.result.type == 3) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'Sample Number' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[0].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[1].label + '  -■-' //y2轴
            this.xAxisName = 'Sample Number'
            this.yAxisName = res.data.result.comments[0].label
            this.yAxisAnotherName = res.data.result.comments[1].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[0].name) {
                    grandsonArrayOne[0] = j
                    grandsonArrayOne[1] = res.data.result.list[i][j][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    grandsonArrayTwo[0] = j
                    grandsonArrayTwo[1] = res.data.result.list[i][j][k] / zoomYTwo
                  }
                }
                sonArrayOne[j] = grandsonArrayOne
                sonArrayTwo[j] = grandsonArrayTwo
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 2) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'time/s' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[0].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[1].label + '  -■-' //y2轴
            this.xAxisName = 'time/s'
            this.yAxisName = res.data.result.comments[0].label
            this.yAxisAnotherName = res.data.result.comments[1].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let timeOptions = []
            for (let i = 0; i < rows.length; i++) {
              timeOptions[i] = 1 / rows[i].frequency
            }
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              let jSub = timeOptions[i] / res.data.result.list[i].length
              for (let j = 0, m = 0; j < timeOptions[i]; m++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][m]) {
                  if (k == res.data.result.comments[0].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayOne[0] = timeOptions[i]
                    } else {
                      grandsonArrayOne[0] = j
                    }
                    grandsonArrayOne[1] = res.data.result.list[i][m][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayTwo[0] = timeOptions[i]
                    } else {
                      grandsonArrayTwo[0] = j
                    }
                    grandsonArrayTwo[1] = res.data.result.list[i][m][k] / zoomYTwo
                  }
                }
                sonArrayOne[m] = grandsonArrayOne
                sonArrayTwo[m] = grandsonArrayTwo

                j = j + jSub
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }
            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 1) {
            // 处理echarts表x、y轴名称
            this.GraphOption.xAxis.name = res.data.result.comments[0].label //x轴
            this.GraphOption.yAxis[1].show = false
            this.GraphOption.yAxis[0].name = res.data.result.comments[1].label //y轴
            this.xAxisName = res.data.result.comments[0].label
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[1].label
            if (this.GraphOption.yAxis[0].max != undefined) {
              this.$delete(this.GraphOption.xAxis, 'max')
              this.$delete(this.GraphOption.yAxis[0], 'max')
              this.$delete(this.GraphOption.yAxis[0], 'min')
              this.$delete(this.GraphOption.yAxis[1], 'max')
              this.$delete(this.GraphOption.yAxis[1], 'min')
            }

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArray = []
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var grandsonArray = []
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[0].name) {
                    grandsonArray[0] = res.data.result.list[i][j][k]
                  } else if (k == res.data.result.comments[1].name) {
                    grandsonArray[1] = res.data.result.list[i][j][k]
                  }
                }
                sonArray[j] = grandsonArray
              }
              let inputParams = {
                name: nameTitle[i],
                data: sonArray,
                type: 'line',
                smooth: false
              }
              this.GraphOption.series.push(inputParams)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          }

          this.dynamicSetGridAndHeight(rows)
        })
      } else if (this.importDataType == '永磁性能') {
        this.myChart = echarts.init(document.getElementById('main'))
        this.myChart.showLoading()
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: '/perMaterialData/getMaterialData',
          method: 'POST',
          data: new Object({ type: '永磁' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes, dataId: arr })
        }).then(res => {
          console.log('冬哥的数据', res)
          this.measureHead = []
          // 处理表头数据
          for (let i = 1; i <= res.data.result.comments.length - 2; i++) {
            let addData = {
              label: '',
              name: ''
            }
            addData.label = res.data.result.comments[i].label
            addData.name = res.data.result.comments[i].name
            this.measureHead.push(addData)
          }
          // 处理表身数据
          this.measureList = []
          if (this.conditionInfo.curveTypes !== '磁滞回线') {
            this.measureList = JSON.parse(JSON.stringify(res.data.result.list[res.data.result.list.length - 1]))
          } else {
            this.measureList = JSON.parse(JSON.stringify(res.data.result.listBt[res.data.result.listBt.length - 1]))
            this.measureList.unshift(...JSON.parse(JSON.stringify(res.data.result.listJt[res.data.result.listJt.length - 1])))
          }
          //type=1为普通echarts图表，type=2为以频率为横坐标的图表，type=3为以数据个数为横坐标的图表
          if (res.data.result.type == 3) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'Sample Number' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[1].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[2].label + '  -■-' //y2轴
            this.xAxisName = 'Sample Number'
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[2].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[2].name) {
                    grandsonArrayOne[0] = j
                    grandsonArrayOne[1] = res.data.result.list[i][j][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    grandsonArrayTwo[0] = j
                    grandsonArrayTwo[1] = res.data.result.list[i][j][k] / zoomYTwo
                  }
                }
                sonArrayOne[j] = grandsonArrayOne
                sonArrayTwo[j] = grandsonArrayTwo
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 2) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'time/s' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[1].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[2].label + '  -■-' //y2轴
            this.xAxisName = 'time/s'
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[2].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let timeOptions = []
            for (let i = 0; i < rows.length; i++) {
              timeOptions[i] = 1 / rows[i].frequency
            }
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              let jSub = timeOptions[i] / res.data.result.list[i].length
              for (let j = 0, m = 0; j < timeOptions[i]; m++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][m]) {
                  if (k == res.data.result.comments[2].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayOne[0] = timeOptions[i]
                    } else {
                      grandsonArrayOne[0] = j
                    }
                    grandsonArrayOne[1] = res.data.result.list[i][m][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayTwo[0] = timeOptions[i]
                    } else {
                      grandsonArrayTwo[0] = j
                    }
                    grandsonArrayTwo[1] = res.data.result.list[i][m][k] / zoomYTwo
                  }
                }
                sonArrayOne[m] = grandsonArrayOne
                sonArrayTwo[m] = grandsonArrayTwo

                j = j + jSub
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }
            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 1 && this.conditionInfo.curveTypes == '磁滞回线') {
            // 海工大要求：磁滞回线与退磁曲线只显示第二象限坐标点
            // 处理echarts表x、y轴名称
            this.GraphOption.xAxis.name = res.data.result.comments[1].label //x轴
            this.GraphOption.yAxis[1].show = true //是否开启双y轴
            this.GraphOption.yAxis[0].name = res.data.result.comments[2].label + '  ⬤' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[3].label + '  ◆' //y2轴
            this.xAxisName = res.data.result.comments[1].label
            this.yAxisName = res.data.result.comments[2].label
            this.yAxisAnotherName = res.data.result.comments[3].label
            if (this.GraphOption.yAxis[0].max != undefined) {
              this.$delete(this.GraphOption.yAxis[0], 'max')
              this.$delete(this.GraphOption.yAxis[0], 'min')
              this.$delete(this.GraphOption.yAxis[1], 'max')
              this.$delete(this.GraphOption.yAxis[1], 'min')
            }

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.listBt.length; i++) {
              var sonArrayOne = []
              var sonArrayOneNum = 0
              for (let j = 0; j < res.data.result.listBt[i].length; j++) {
                var xNum = ''
                var yNumOne = ''
                for (let k in res.data.result.listBt[i][j]) {
                  if (k == res.data.result.comments[1].name) {
                    xNum = res.data.result.listBt[i][j][k]
                  } else if (k == res.data.result.comments[2].name) {
                    yNumOne = res.data.result.listBt[i][j][k]
                  }
                }
                sonArrayOne[sonArrayOneNum] = [xNum, yNumOne]
                sonArrayOneNum++
              }

              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'scatter',
                smooth: false,
                symbol: 'circle',
                symbolSize: 5
              }
              this.GraphOption.series.push(inputParamsOne)
            }
            for (let i = 0; i < res.data.result.listJt.length; i++) {
              var sonArrayTwo = []
              var sonArrayTwoNum = 0
              for (let j = 0; j < res.data.result.listJt[i].length; j++) {
                var xNum = ''
                var yNumTwo = ''
                for (let k in res.data.result.listJt[i][j]) {
                  if (k == res.data.result.comments[1].name) {
                    xNum = res.data.result.listJt[i][j][k]
                  } else if (k == res.data.result.comments[3].name) {
                    yNumTwo = res.data.result.listJt[i][j][k]
                  }
                }
                sonArrayTwo[sonArrayTwoNum] = [xNum, yNumTwo]
                sonArrayTwoNum++
              }

              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'scatter',
                smooth: false,
                symbol: 'diamond',
                symbolSize: 5
              }
              // this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }
            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 1 && this.conditionInfo.curveTypes == '退磁曲线') {
            // 海工大要求：磁滞回线与退磁曲线只显示第二象限坐标点
            // 处理echarts表x、y轴名称
            this.GraphOption.xAxis.name = res.data.result.comments[1].label //x轴
            this.GraphOption.yAxis[1].show = true //是否开启双y轴
            this.GraphOption.yAxis[0].name = res.data.result.comments[2].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[3].label + '  -■-' //y2轴
            this.xAxisName = res.data.result.comments[1].label
            this.yAxisName = res.data.result.comments[2].label
            this.yAxisAnotherName = res.data.result.comments[3].label
            if (this.GraphOption.yAxis[0].max != undefined) {
              this.$delete(this.GraphOption.yAxis[0], 'max')
              this.$delete(this.GraphOption.yAxis[0], 'min')
              this.$delete(this.GraphOption.yAxis[1], 'max')
              this.$delete(this.GraphOption.yAxis[1], 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 0)
            this.$set(this.GraphOption.yAxis[0], 'min', 0)
            this.$set(this.GraphOption.yAxis[1], 'min', 0)

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              var sonArrayOneNum = 0
              var sonArrayTwoNum = 0
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var xNum = ''
                var yNumOne = ''
                var yNumTwo = ''
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[1].name) {
                    xNum = res.data.result.list[i][j][k]
                  } else if (k == res.data.result.comments[2].name) {
                    yNumOne = res.data.result.list[i][j][k]
                  } else if (k == res.data.result.comments[3].name) {
                    yNumTwo = res.data.result.list[i][j][k]
                  }
                }
                sonArrayOne[sonArrayOneNum] = [xNum, yNumOne]
                sonArrayOneNum++
                sonArrayTwo[sonArrayTwoNum] = [xNum, yNumTwo]
                sonArrayTwoNum++
              }

              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          }

          this.dynamicSetGridAndHeight(rows)
        })
      } else if (this.importDataType == '导电性能') {
        this.myChart = echarts.init(document.getElementById('main'))
        this.myChart.showLoading()
        this.axios({
          baseURL: 'http://59.172.104.174:30669',
          url: '/eleData/getMaterialData',
          method: 'POST',
          data: new Object({ type: '导电' + this.conditionInfo.timeTypes + this.conditionInfo.curveTypes, dataId: arr })
        }).then(res => {
          this.measureHead = []
          // 处理表头数据
          for (let i = 1; i < res.data.result.comments.length - 1; i++) {
            let addData = {
              label: '',
              name: ''
            }
            addData.label = res.data.result.comments[i].label
            addData.name = res.data.result.comments[i].name
            this.measureHead.push(addData)
          }
          // 处理表身数据
          this.measureList = []
          this.measureList = res.data.result.list[res.data.result.list.length - 1]

          //type=1为普通echarts图表，type=2为以频率为横坐标的图表，type=3为以数据个数为横坐标的图表
          if (res.data.result.type == 3) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'Sample Number' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[1].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[2].label + '  -■-' //y2轴
            this.xAxisName = 'Sample Number'
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[2].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[2].name) {
                    grandsonArrayOne[0] = j
                    grandsonArrayOne[1] = res.data.result.list[i][j][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    grandsonArrayTwo[0] = j
                    grandsonArrayTwo[1] = res.data.result.list[i][j][k] / zoomYTwo
                  }
                }
                sonArrayOne[j] = grandsonArrayOne
                sonArrayTwo[j] = grandsonArrayTwo
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 2) {
            // 处理echarts表x、y1、y2轴名称
            this.GraphOption.xAxis.name = 'time/s' //x轴
            this.GraphOption.yAxis[1].show = true
            this.GraphOption.yAxis[0].name = res.data.result.comments[1].label + '  -○-' //y1轴
            this.GraphOption.yAxis[1].name = res.data.result.comments[2].label + '  -■-' //y2轴
            this.xAxisName = 'time/s'
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[2].label
            if (this.GraphOption.xAxis.min != undefined) {
              this.$delete(this.GraphOption.xAxis, 'min')
            }
            this.$set(this.GraphOption.xAxis, 'max', 'dataMax')
            this.$set(this.GraphOption.yAxis[0], 'max', 1)
            this.$set(this.GraphOption.yAxis[0], 'min', -1)
            this.$set(this.GraphOption.yAxis[1], 'max', 1)
            this.$set(this.GraphOption.yAxis[1], 'min', -1)

            // 缩放为1处理
            let timeOptions = []
            for (let i = 0; i < rows.length; i++) {
              timeOptions[i] = 1 / rows[i].frequency
            }
            let zoomYOne = res.data.result.maxY
            let zoomYTwo = res.data.result.maxX

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArrayOne = []
              var sonArrayTwo = []
              let jSub = timeOptions[i] / res.data.result.list[i].length
              for (let j = 0, m = 0; j < timeOptions[i]; m++) {
                var grandsonArrayOne = []
                var grandsonArrayTwo = []
                for (let k in res.data.result.list[i][m]) {
                  if (k == res.data.result.comments[2].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayOne[0] = timeOptions[i]
                    } else {
                      grandsonArrayOne[0] = j
                    }
                    grandsonArrayOne[1] = res.data.result.list[i][m][k] / zoomYOne
                  } else if (k == res.data.result.comments[1].name) {
                    if (m == res.data.result.list[i].length - 1) {
                      // 定死x轴坐标最大值
                      grandsonArrayTwo[0] = timeOptions[i]
                    } else {
                      grandsonArrayTwo[0] = j
                    }
                    grandsonArrayTwo[1] = res.data.result.list[i][m][k] / zoomYTwo
                  }
                }
                sonArrayOne[m] = grandsonArrayOne
                sonArrayTwo[m] = grandsonArrayTwo

                j = j + jSub
              }
              let inputParamsOne = {
                name: nameTitle[i],
                data: sonArrayOne,
                type: 'line',
                smooth: false
              }
              let inputParamsTwo = {
                name: nameTitle[i],
                data: sonArrayTwo,
                type: 'line',
                smooth: false,
                symbol: 'rect'
                // colorBy: 'series',
                // itemStyle: {
                //   color: this.randColor(),
                // },
              }
              this.GraphOption.series.push(inputParamsOne)
              this.GraphOption.series.push(inputParamsTwo)
            }
            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
          } else if (res.data.result.type == 1) {
            // 处理echarts表x、y轴名称
            this.GraphOption.xAxis.name = res.data.result.comments[1].label //x轴
            this.GraphOption.yAxis[1].show = false
            this.GraphOption.yAxis[0].name = res.data.result.comments[2].label //y轴
            this.xAxisName = res.data.result.comments[2].label
            this.yAxisName = res.data.result.comments[1].label
            this.yAxisAnotherName = res.data.result.comments[1].label
            if (this.GraphOption.yAxis[0].max != undefined) {
              this.$delete(this.GraphOption.xAxis, 'max')
              this.$delete(this.GraphOption.yAxis[0], 'max')
              this.$delete(this.GraphOption.yAxis[0], 'min')
              this.$delete(this.GraphOption.yAxis[1], 'max')
              this.$delete(this.GraphOption.yAxis[1], 'min')
            }
            this.$set(this.GraphOption.xAxis, 'scale', true)
            this.$set(this.GraphOption.yAxis[0], 'scale', true)
            this.$set(this.GraphOption.yAxis[1], 'scale', true)

            // 处理echarts表series数据
            for (let i = 0; i < res.data.result.list.length; i++) {
              var sonArray = []
              for (let j = 0; j < res.data.result.list[i].length; j++) {
                var grandsonArray = []
                for (let k in res.data.result.list[i][j]) {
                  if (k == res.data.result.comments[1].name) {
                    grandsonArray[0] = res.data.result.list[i][j][k]
                  } else if (k == res.data.result.comments[2].name) {
                    grandsonArray[1] = res.data.result.list[i][j][k]
                  }
                }
                sonArray[j] = grandsonArray
              }
              let inputParams = {
                name: nameTitle[i],
                data: sonArray,
                type: 'line',
                smooth: false
              }
              this.GraphOption.series.push(inputParams)
            }

            // 处理echarts表legend数据
            this.GraphOption.legend.data = nameTitle
            console.log('this.GraphOption', this.GraphOption)
          }

          this.dynamicSetGridAndHeight(rows)
        })
      }
    },
    // 随机生成一个rgb颜色
    randColor() {
      let colorw = `rgb(${Math.round(Math.random() * 255)},${Math.round(Math.random() * 255)},${Math.round(Math.random() * 255)})`
      return colorw
    },
    dynamicSetGridAndHeight(rows) {
      let legendNum = rows.length
      if (legendNum == 0) {
        this.GraphOption.grid[0].top = 40
        this.graphHeight = 600
      } else {
        this.GraphOption.grid[0].top = 30 + 20 * legendNum + Math.trunc(legendNum / 10) * 20
        this.graphHeight = 600 + 20 * (legendNum - 1)
      }
      this.$nextTick(() => {
        this.drawChart(this.graphHeight)
      })
    },
    drawChart(relHeight) {
      this.myChart.clear()
      this.myChart.hideLoading()
      this.myChart.setOption(this.GraphOption)
      const autoHeight = relHeight
      // myChart.getDom().style.height = autoHeight + 'px'
      this.myChart.resize()
    },
    // echarts横坐标指数倍放大
    indexEnlarge() {
      if (this.indexEnlargeStatus == true) {
        //开启半对数图
        // this.$set(this.GraphOption.xAxis, 'type', 'log')
        // this.$set(this.GraphOption.xAxis, 'logBase', 10)
        // this.$set(this.GraphOption.xAxis, 'minorTick', {
        //   show: true
        // })
        // this.$set(this.GraphOption.xAxis, 'minorSplitLine', {
        //   show: true
        // })
        this.$set(this.GraphOption.yAxis[0], 'type', 'log')
        this.$set(this.GraphOption.yAxis[0], 'logBase', 10)
        this.$set(this.GraphOption.yAxis[0], 'minorTick', {
          show: true
        })
        this.$set(this.GraphOption.yAxis[0], 'minorSplitLine', {
          show: true
        })
        this.indexEnlargeStatus = !this.indexEnlargeStatus
        this.dynamicSetGridAndHeight(this.GraphOption.series)
      } else if (this.indexEnlargeStatus == false) {
        //关闭半对数图
        // this.$delete(this.GraphOption.xAxis, 'type')
        // this.$delete(this.GraphOption.xAxis, 'logBase')
        // this.$delete(this.GraphOption.xAxis, 'minorTick')
        // this.$delete(this.GraphOption.xAxis, 'minorSplitLine')
        this.$delete(this.GraphOption.yAxis[0], 'type')
        this.$delete(this.GraphOption.yAxis[0], 'logBase')
        this.$delete(this.GraphOption.yAxis[0], 'minorTick')
        this.$delete(this.GraphOption.yAxis[0], 'minorSplitLine')
        this.indexEnlargeStatus = !this.indexEnlargeStatus
        this.dynamicSetGridAndHeight(this.GraphOption.series)
      }
    },
    downloadAttachment(dataName) {
      console.log('dataName----', dataName)
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/attachmentUpload/downLoadAttachmentFile',
        method: 'GET',
        params: {
          filename: dataName
        },
        responseType: 'blob' // 表明返回服务器返回的数据类型
      }).then(res => {
        let blob = new Blob([res.data])
        let fileName = dataName
        if (window.navigator.msSaveOrOpenBlob) {
          navigator.msSaveBlob(blob, fileName)
        } else {
          var link = document.createElement('a')
          link.href = window.URL.createObjectURL(blob)
          link.download = fileName
          link.click()
          //释放内存
          window.URL.revokeObjectURL(link.href)
        }
      })
    },
    downLoadFileName(dataName) {
      console.log('dataName', dataName)
      if(dataName == '未知' || dataName == '') {
        Message({
          message: '数据库暂未收录该消息，欢迎使用附件上传',
          type: 'warning',
          center: true,
          customClass: 'mzindex',
        })
        return
      }
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/basicsExecutionStandard/getFilenameByNumber',
        method: 'GET',
        params: {
          number: dataName
        },
      }).then(res => {
        console.log('res----', res.data.result.filename)
        if(res.data.result.filename != '' && res.data.result.filename != null){
          this.downloadAttachment(res.data.result.filename)
        } else {
          Message({
            message: '数据库暂未收录该消息，欢迎使用附件上传',
            type: 'warning',
            center: true,
            customClass: 'mzindex',
          })
        }
      })
    },
  }
}
</script>

<style></style>
